flowchart TD
  subgraph sg0["Case 1"]
    direction TB
    n0["Before"]
    n4["After"]
    subgraph sg1["If should always do else"]
      direction TB
      n1{"If should always do else"}
      class n1 decisionNode;
      n2["impossible: return 1"]
      n3["should always be 5"]
    end
  end
  subgraph sg2["Main Function"]
    direction TB
    n5["oopsie"]
    n8["another increm"]
    subgraph sg3["increment maybe?"]
      direction TB
      n6{"increment maybe?"}
      class n6 decisionNode;
      n7["dummy variable y"]
    end
  end
  n1 --> n2
  n1 --> n3
  n6 --> n7
  n0 --> n1
  n2 --> n4
  n3 --> n4
  n5 --> n6
  n7 --> n8
%%__BAML_SPANMAP__={"n0":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":4,"start":4,"end_line":4,"end":15},"n1":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":6,"start":4,"end_line":6,"end":32},"n2":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":8,"start":8,"end_line":8,"end":33},"n3":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":11,"start":8,"end_line":11,"end":31},"n4":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":15,"start":4,"end_line":15,"end":13},"n5":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":23,"start":4,"end_line":23,"end":14},"n6":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":25,"start":4,"end_line":25,"end":24},"n7":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":30,"start":8,"end_line":30,"end":29},"n8":{"file_path":"tests/validation_files/headers/if_then_else.baml","start_line":34,"start":4,"end_line":34,"end":22}}
  click n0 call bamlMermaidNodeClick() "Go to source"
  click n1 call bamlMermaidNodeClick() "Go to source"
  click n2 call bamlMermaidNodeClick() "Go to source"
  click n3 call bamlMermaidNodeClick() "Go to source"
  click n4 call bamlMermaidNodeClick() "Go to source"
  click n5 call bamlMermaidNodeClick() "Go to source"
  click n6 call bamlMermaidNodeClick() "Go to source"
  click n7 call bamlMermaidNodeClick() "Go to source"
  click n8 call bamlMermaidNodeClick() "Go to source"